<?php

include_once 'Bot.php';
include_once 'RedmineApi.php';

ini_set('display_errors', 1);
error_reporting(E_ALL);

$users = Bot::getInstance()->getUsers();
var_dump($users);
//Bot::getInstance()->assignTo($issueId, $playform, $notes = '');
//

var_dump($users);
if ($_REQUEST['redmine_id'] && $_REQUEST['issue_id']) {
    $playform = preg_replace('/@.*/', '', $_REQUEST['changer_mail']);
//    $res = exec("php sendAssign.php " . $_REQUEST['redmine_id']  . " " . $_REQUEST['issue_id'] . " " . $playform);
    file_put_contents('logs/messages/assign/' . date('Y-m-d') . '.txt', date('H-i-s') . ' - ' . serialize($_REQUEST) . serialize($res), FILE_APPEND);
}


